//
//  User.m
//  RedManStock
//
//  Created by lanou3g on 15/8/2.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "User.h"

@implementation User

-(void)encodeWithCoder:(NSCoder *)aCoder{
    [aCoder encodeObject:self.totalAsset forKey:@"totalAsset"];
    [aCoder encodeObject:self.lastTotalAsset forKey:@"lastTotalAsset"];
    [aCoder encodeObject:self.availableAsset forKey:@"availableAsset"];
    [aCoder encodeObject:self.totalPrice forKey:@"totalPrice"];
    [aCoder encodeObject:self.totalYield forKey:@"totalYield"];
    [aCoder encodeObject:self.day_yield forKey:@"day_yield"];
    [aCoder encodeObject:self.day_yieldRate forKey:@"day_yieldRate"];
}

- (id)initWithCoder:(NSCoder *)aDecoder{
    
    if (self=[super init]) {
        self.totalAsset=[aDecoder decodeObjectForKey:@"totalAsset"];
        self.lastTotalAsset=[aDecoder decodeObjectForKey:@"lastTotalAsset"];
        self.availableAsset=[aDecoder decodeObjectForKey:@"availableAsset"];
        self.totalPrice=[aDecoder decodeObjectForKey:@"totalPrice"];
        self.totalYield=[aDecoder decodeObjectForKey:@"totalYield"];
        self.day_yield=[aDecoder decodeObjectForKey:@"day_yield"];
        self.day_yieldRate=[aDecoder decodeObjectForKey:@"day_yieldRate"];
    }
    return self;
}
@end